]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
workspacesView: Override vfunc_hide
authorGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Tue, 2 Jun 2020 17:15:45 +0000 (14:15 -0300)
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Wed, 3 Jun 2020 15:55:42 +0000 (12:55 -0300)
Override the hide vfunc instead of the plain hide() method.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1295

js/ui/workspacesView.js

index b196427cc932aba9d0326a15054e6d3a487de775..335344eb0a0b6b335dd42f084b5b058abe36e53d 100644 (file)
@@ -393,7 +393,10 @@ class ExtraWorkspaceView extends WorkspacesViewBase {
 var WorkspacesDisplay = GObject.registerClass(
 class WorkspacesDisplay extends St.Widget {
     _init(scrollAdjustment) {
-        super._init({ clip_to_allocation: true });
+        super._init({
+            visible: false,
+            clip_to_allocation: true,
+        });
         this.connect('notify::allocation', this._updateWorkspacesActualGeometry.bind(this));
 
         let workspaceManager = global.workspace_manager;
@@ -609,6 +612,7 @@ class WorkspacesDisplay extends St.Widget {
     }
 
     animateToOverview(fadeOnPrimary) {
+        this.show();
         this._updateWorkspacesViews();
         for (let i = 0; i < this._workspacesViews.length; i++) {
             let animationType;
@@ -640,7 +644,7 @@ class WorkspacesDisplay extends St.Widget {
         }
     }
 
-    hide() {
+    vfunc_hide() {
         if (this._restackedNotifyId > 0) {
             Main.overview.disconnect(this._restackedNotifyId);
             this._restackedNotifyId = 0;
@@ -656,6 +660,8 @@ class WorkspacesDisplay extends St.Widget {
         for (let i = 0; i < this._workspacesViews.length; i++)
             this._workspacesViews[i].destroy();
         this._workspacesViews = [];
+
+        super.vfunc_hide();
     }
 
     _workspacesOnlyOnPrimaryChanged() {